home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 001-025 / disk_013 / rgbmenu1.bas < prev    next >
BASIC Source File  |  1992-05-06  |  1KB  |  60 lines

  1. 5     dim a$(3)
  2. 6     a$(0)="red":a$(1)="grn":a$(2)="blu"
  3. 10    screen 0,5,0
  4. 20    for y%=0to 3
  5. 30    for x%=0to 7
  6. 40    col%=(x%*4)+y%
  7. 50    pena col%
  8. 60    xx%=x%*23:yy%=y%*23
  9. 70    box (xx%,yy%;xx%+23,yy%+23),1
  10. 80    next
  11. 90    next
  12. 100   graphic(1)
  13. 105   pena 1
  14. 110   widt%=180'ask window widt%,y%
  15. 120   bst%=100
  16. 130   for i%=0 to 2
  17. 140   'box(30,bst%+(i%*10);widt%,bst%+9+(i%*10))
  18. 145   print at(0,bst%+8+i%*10);a$(i%)
  19. 150   next
  20. 155   ii=(widt%-30)/16
  21. 160   for i%=0 to 16
  22. 170   x%=i%*ii + 30%
  23. 180   draw(x%,bst%-6 to x%,bst%)
  24. 190   next
  25. 1000  ask mouse wx%,wy%,b%
  26. 1010  if b%=0 then 1000
  27. 1015  if wx%>181 then goto 1000
  28. 1020  if wy%>92 then goto 2000
  29. 1025  p%=wx%:q%=wy%
  30. 1030  wx%=(wx%-9)/23
  31. 1040  wy%=(wy%-11)/23
  32. 1050  col%=wx%*4+wy%
  33. 1055  gosub 2040
  34. 1056  ask mouse x%,y%,b%
  35. 1057  if b%<>0 then goto 1056
  36. 1060  goto 1000
  37. 2000  if wy%<=bst% or wy%>130 then goto 1000
  38. 2005  ask mouse wx%,wy%,b%
  39. 2007  if b%=0 then goto 2005
  40. 2008  wx%=wx%-8
  41. 2009  if wx%<30 then goto 2000
  42. 2010  wy%=wy%-bst%-6
  43. 2015  which%=wy%/10
  44. 2016  if xy%<0 then wy%=0
  45. 2020  place = (wx%-30)/9.375
  46. 2030  color%=place
  47. 2031  hue%(which%)=color%
  48. 2032  rgb col%,hue%(0),hue%(1),hue%(2)
  49. 2033  gosub 2040
  50. 2034  ask mouse x%,y%,b%
  51. 2035  if b%<>0 then goto 2034
  52. 2036  goto 2000
  53. 2040  ask rgb col%,hue%(0),hue%(1),hue%(2)
  54. 2041  pena col%:box(31,bst%;widt%,bst%+30),1
  55. 2045  pena 1
  56. 2050  for i%=0 to 2
  57. 2060  box(31,bst%+2+(i%*10);39+(hue%(i%)*ii),bst%+9+(i%*10)),1
  58. 2070  next
  59. 2080  return
  60.